<?php 
/**
 * IMMOPHP
 * @author Drouche Romain
 * @contact contact@immophp.fr
 * @website www.immophp.fr
 * */
 
require 'kernel/common.php';

require_once IMMOPHP_ADMIN_ROOT_PATH .'kernel/header.php'; 

if(isset($_GET['plugins']) && $_GET['plugins'] != '')
{
    if(isset($_GET['p']))
    {
        if(is_file('plugins/'.$_GET['plugins'].'/'. $_GET['p'] .'.php')) 
            require 'plugins/'.$_GET['plugins'].'/'. $_GET['p'] .'.php';
        else 
            require 'plugins/'.$_GET['plugins'].'/index.php';
    }
    else
       require 'plugins/'.$_GET['plugins'].'/index.php'; 
}
require 'footer.php';
?>